package com.tieto.springboot.demo.customsession;

import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class FIlterConfig {

	@Bean
	public FilterRegistrationBean filterRegistrationBean(CustomSessionFilter customSessionFilter){
		FilterRegistrationBean filterRegistrationBean = new FilterRegistrationBean();  
        filterRegistrationBean.setFilter(customSessionFilter);  
        filterRegistrationBean.setEnabled(true);  
        filterRegistrationBean.addUrlPatterns("/*");  
        return filterRegistrationBean;  
	}
}
